package cn.kgc.searcher.controller;

import cn.kgc.dto.Dto;
import cn.kgc.searcher.service.SearchService;
import cn.kgc.searcher.vo.CityVo;
import cn.kgc.searcher.vo.HotelVo;
import cn.kgc.searcher.vo.PageUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/")
public class SearchController {
    @Resource
    private SearchService searchService;
    @PostMapping("hotellist/searchItripHotelPage")
    public Dto<PageUtil> searchItripHotelPage(@RequestBody HotelVo hotelVo){
        return searchService.searchItripHotelPage(hotelVo);
    }

    @PostMapping("hotellist/searchItripHotelListByHotCity")
    public Dto<PageUtil> searchItripHotelListByHotCity(@RequestBody CityVo cityVo){
        return searchService.searchItripHotelListByHotCity(cityVo);
    }
}
